package com.ctgu.tengyun.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.util.Date;

public class SaleOrderRecord implements Serializable {

    public static final Composer<Long, SaleOrderRecord> ID_COMPOSER = SaleOrderRecord::getId;
    public static final Composer<Long, SaleOrderRecord> CUSTOMER_ID_COMPOSER = SaleOrderRecord::getCustomerId;
    public static final Composer<Long, SaleOrderRecord> OPERATION_USER_ID_COMPOSER = SaleOrderRecord::getOperationUserId;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 物件名称
     */
    private String name;

    /**
     * 产品型号
     */
    private String productNo;

    /**
     * 备件型号
     */
    private String partNo;

    /**
     * 设备类型,1-零件
     */
    private Integer electricType;

    /**
     * 数量
     */
    private Integer saleNum;

    /**
     * 客户id(申报人)
     */
    private Long customerId;

    /**
     * 联系方式
     */
    private String contactNo;

    /**
     * 申报时间
     */
    private Date applyTime;

    /**
     * 收货地址
     */
    private String receiveAddress;

    /**
     * 备注
     */
    private String remark;

    /**
     * 操作人id
     */
    private Long operationUserId;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 是否有效,0-无效，1-有效
     */
    private Integer isValid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后更新时间
     */
    private Date lastModifyTime;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getPartNo() {
        return partNo;
    }

    public void setPartNo(String partNo) {
        this.partNo = partNo;
    }

    public Integer getElectricType() {
        return electricType;
    }

    public void setElectricType(Integer electricType) {
        this.electricType = electricType;
    }

    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getContactNo() {
        return contactNo;
    }

    public void setContactNo(String contactNo) {
        this.contactNo = contactNo;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public String getReceiveAddress() {
        return receiveAddress;
    }

    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getOperationUserId() {
        return operationUserId;
    }

    public void setOperationUserId(Long operationUserId) {
        this.operationUserId = operationUserId;
    }

    @JsonIgnore
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @JsonIgnore
    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonIgnore
    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", productNo=").append(productNo);
        sb.append(", partNo=").append(partNo);
        sb.append(", electricType=").append(electricType);
        sb.append(", saleNum=").append(saleNum);
        sb.append(", customerId=").append(customerId);
        sb.append(", contactNo=").append(contactNo);
        sb.append(", applyTime=").append(applyTime);
        sb.append(", receiveAddress=").append(receiveAddress);
        sb.append(", remark=").append(remark);
        sb.append(", operationUserId=").append(operationUserId);
        sb.append(", version=").append(version);
        sb.append(", isValid=").append(isValid);
        sb.append(", createTime=").append(createTime);
        sb.append(", lastModifyTime=").append(lastModifyTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}